Documentation for class craftman

Inherits from 	basic_object 

Properties declared in craftman 

Class Methods declared in craftman 
	new 

Methods declared in craftman 
	action 
		ask_open 
		hide 
		quit 
	any 
		ask_open 
		get_default_value(application, parameter) 
		hide 
		home_directory 
		host_name 
		inspect 
		is_active 
		is_hidden 
		log_error(string) 
		open(path) 
		programs 
		quit 
		remove_default_value(application, parameter) 
		set_default_value(application, parameter, value) 
		unhide 
		unhide_without_activation 
		user_name 
		version 

Class 
#begin_class
craftman 
The class craftman is a sub-class of the class basic_object. 
There is only one instance of the craftman class, the CraftMan application itself. It is referred to by the constant the_craftman.
Ex:
the_craftman:hide
hides the CraftMan application in the Workspace.
#end_class

Properties 

Methods 

#begin_method
ask_open 
Brings up an Open Panel to allow the user to open new CraftMan programs.
Returns true if all the selected programs were opened successfully. Otherwise the method returns false.
#end_method

#begin_method
get_default_value(application, parameter) 
Returns the value of parameter for application in the defaults database in your home directory. If the parameter does not exist the method returns nil.
Ex:
the_craftman:get_default_value("Mail", "AutoFetch")
returns "NO" if you have set Manual New Mail Retrieval in the Mail Preferences to Manual.
returns "YES" if you have set Manual New Mail Retrieval in the Mail Preferences to Automatic.
#end_method

#begin_method
hide 
Hides the CraftMan application in the Workspace.
Returns self.
#end_method

#begin_method
home_directory 
Returns a string with the full pathname of your home directory.
#end_method

#begin_method
host_name 
Returns a string with the name of the machine you are running.
#end_method

#begin_method
inspect 
Opens the CraftMan inspector.
Returns self.
#end_method

#begin_method
is_active 
Returns true if CraftMan is the active application. Otherwise the method returns false.
#end_method

#begin_method
is_hidden 
Returns true if CraftMan is hidden in the Workspace. Otherwise the method returns false.
#end_method

#begin_method
log_error(string) 
Prints string in the Console window in the Workspace.
Returns self.
#end_method

#begin_method
open(path) 
Opens the program with the full pathname path. 
Returns true if successful. Otherwise the method returns false.
#end_method

#begin_method
programs 
Returns a collection of strings representing the currently open program.
#end_method

#begin_method
quit 
Quits the CraftMan application.
#end_method

#begin_method
remove_default_value(application, parameter) 
Removes the value of parameter for application in the defaults database in your home directory. If the parameter does not exist the method returns nil.
Also see get_default_value(application, parameter).
#end_method

#begin_method
set_default_value(application, parameter, value) 
Sets the value of parameter for application to value in the defaults database in your home directory. If the parameter does not exist the method returns nil.
Also see get_default_value(application, parameter).
#end_method

#begin_method
unhide 
Unhides the CraftMan application in the Workspace and makes it the active application.
Returns self.
#end_method

#begin_method
unhide_without_activation 
Unhides the CraftMan application in the Workspace but does not make it the active application.
Returns self.
#end_method

#begin_method
user_name 
Returns a string containing the name of the user.
#end_method

#begin_method
version 
Returns the version number of running CraftMan application.
#end_method

Class Methods 

#begin_class_method
new 
Overrides the normal new method that creates a new instance of a class. The craftman class may not create new instances. There may only be one craftman instance.
Ex:
{craftman}:new
will raise an exception
Exception:
The message new was sent to the class craftman but there can only be one craftman!
#end_class_method